package net.hn.hnms.biz.api.safety.monitor.model;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * 智呈物联 pan'sx
 * 2022/7/26 16:17
 * 1.0 version
 */
@ApiModel("安全监控-今日信息")
@Data
public class MonitorTodayInfo {
    private String mineName;
    private String companyName;
    private String mineCode;
    private Item blue;
    private Item yellow;
    private Item orange;
    private Item red;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MonitorTodayInfo)) return false;
        MonitorTodayInfo that = (MonitorTodayInfo) o;
        return Objects.equals(mineCode, that.mineCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mineCode);
    }

    @Setter
    @Getter
    public
    class Item{
        private long co;
        private long ch4;
        private long count;
        public void addCount(){
            this.count=co+ch4;
        }
    }
}
